import request from '@/utils/request';

// 获取通知列表
export function getNotifications(pageNum: number, pageSize: number) {
  return request({
    url: '/api/notifications',
    method: 'get',
    params: { pageNum, pageSize }
  });
}

// 获取未读通知数量
export function getUnreadNotificationCount() {
  return request({
    url: '/api/notifications/unread/count',
    method: 'get'
  });
}

// 标记单条通知为已读
export function markAsRead(notificationId: number) {
  return request({
    url: `/api/notifications/${notificationId}/read`,
    method: 'put'
  });
}

// 标记所有通知为已读
export function markAllNotificationsAsRead() {
  return request({
    url: '/api/notifications/read/all',
    method: 'put'
  });
}

// 删除通知
export function deleteNotification(notificationId: number) {
  return request({
    url: `/api/notifications/${notificationId}`,
    method: 'delete'
  });
} 